package buildcode.support;

import buildcode.Context;
import buildcode.language.Type;
import buildcode.language.java.type.JavaEntity;

public class SmartContext {

    public static JavaEntity getListRequestType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_LISTREQUEST);
    }

    public static void setListRequestType(JavaEntity listRequestType) {
        Context.put(ContextIdConstant.CONTEXT_ID_LISTREQUEST, listRequestType);
    }

    public static JavaEntity getPageRequestType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_PAGEREQUEST);
    }

    public static void setPageRequestType(JavaEntity pageReuqestType) {
        Context.put(ContextIdConstant.CONTEXT_ID_PAGEREQUEST, pageReuqestType);
    }

    public static JavaEntity getVoType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_VO);
    }

    public static void setVoType(JavaEntity voType) {
        Context.put(ContextIdConstant.CONTEXT_ID_VO, voType);
    }

    public static Type getServiceType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_SERVICE);
    }

    public static void setServiceType(Type serviceType) {
        Context.put(ContextIdConstant.CONTEXT_ID_SERVICE, serviceType);
    }

    public static JavaEntity getQueryType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_QUERY);
    }

    public static void setQueryType(JavaEntity queryType) {
        Context.put(ContextIdConstant.CONTEXT_ID_QUERY, queryType);
    }

    public static JavaEntity getEntityType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_ENTITY);
    }

    public static void setEntityType(JavaEntity entityType) {
        Context.put(ContextIdConstant.CONTEXT_ID_ENTITY, entityType);
    }

    public static JavaEntity getAddRequestType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_ADDREQUEST);
    }

    public static void setAddRequestType(JavaEntity addRequestType) {
        Context.put(ContextIdConstant.CONTEXT_ID_ADDREQUEST, addRequestType);
    }

    public static JavaEntity getUpdateRequestType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_UPDATEREQUEST);
    }

    public static void setUpdateRequestType(JavaEntity updateRequestType) {
        Context.put(ContextIdConstant.CONTEXT_ID_UPDATEREQUEST, updateRequestType);
    }

    public static JavaEntity getDelRequestType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_DELREQUEST);
    }

    public static void setDelRequestType(JavaEntity delRequestType) {
        Context.put(ContextIdConstant.CONTEXT_ID_DELREQUEST, delRequestType);
    }

    public static Type getFeignApiType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_FEIGN_API);
    }

    public static void setFeignApiType(Type feignApiType) {
        Context.put(ContextIdConstant.CONTEXT_ID_FEIGN_API, feignApiType);
    }

    public static Type getMapperType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_JAVA_MAPPER);
    }

    public static void setMapperType(Type mapperType) {
        Context.put(ContextIdConstant.CONTEXT_ID_JAVA_MAPPER, mapperType);
    }

    public static Type getConverterType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_CONVERTER);
    }

    public static void setConverterType(Type converterType) {
        Context.put(ContextIdConstant.CONTEXT_ID_CONVERTER, converterType);
    }

    public static Type getApiPageType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_FORNT_API_PAGE);
    }

    public static void setApiPageType(Type type) {
        Context.put(ContextIdConstant.CONTEXT_ID_FORNT_API_PAGE, type);
    }

    public static Type getListPageType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_FORNT_LIST_PAGE);
    }

    public static void setListPageType(Type type) {
        Context.put(ContextIdConstant.CONTEXT_ID_FORNT_LIST_PAGE, type);
    }

    public static Type getAddPageType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_FORNT_ADD_PAGE);
    }

    public static void setAddPageType(Type type) {
        Context.put(ContextIdConstant.CONTEXT_ID_FORNT_ADD_PAGE, type);
    }

    public static Type getUpdatePageType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_FORNT_UPDATE_PAGE);
    }

    public static void setUpdatePageType(Type type) {
        Context.put(ContextIdConstant.CONTEXT_ID_FORNT_UPDATE_PAGE, type);
    }

    public static Type getTypePageType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_FORNT_TYPE_PAGE);
    }

    public static void setTypePageType(Type type) {
        Context.put(ContextIdConstant.CONTEXT_ID_FORNT_TYPE_PAGE, type);
    }
    
    public static JavaEntity getDtoType() {
        return Context.get(ContextIdConstant.CONTEXT_ID_DTO);
    }
}
